<extend name="Base/common"/>
<block name="body">
<form action="__SELF__" class="form-horizontal"  method="post" enctype="multipart/form-data">
<!--我的钱包-->
		<div id="Poket">
			<header><a href="javascript:;" class="back" onclick="history.go(-1)"><img src="__IMG__/images/back_03.png"/></a>我的钱包<a href="__CONTROLLER__/detailed" class="sure">余额明细</a></header>
			<div class="Mypoket">
				<img src="__IMG__/images/poket_03.jpg"/>
				<p>我的余额</p>
				<h1>￥{$account}</h1>
				<input type="text" name="change" id="tt" onkeyup="check();" placeholder="请输入提现金额" style="display: none;border-radius: 10px;padding: 10px;margin: 10px;" />
				<input type="button" name="" id="btn" value="提现" />
				<input type="submit" id="btn" value="确认" class="ajax-post" target-form="form-horizontal" style="display: none;" /><p>每节课程完成平台收取7%的服务费。</p>
				<input type="hidden" name="account" value="{$account}" />
			</div>
		</div>
</form>
<script>
	//检测输入合法性;
	function check(){
	    var i=document.getElementById("tt").value;
	    if ( isNaN(i) ) {
	        layer.msg("非法字符！");
	        tt.value="";
	    } else {
	    	tt.value = i.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
	    }
	}

	// $('form').submit(function(){
	// 	if ($('input[name=change]').val() == '') {
	// 		layer.alert('请输入金额',{'title':'抱歉'});
	// 		return false;
	// 	}
	// });

	$('input[type=button]').click(function(){
		$('input[name=change]').show('400');
		$(this).hide();
		$('input[type=submit]').show();
		$('#tt').focus();
	})
</script> 
</block>